package com.jp.knowledge.activity;

import android.view.View;

import com.jp.knowledge.R;
import com.jp.knowledge.comm.SlidingActivity;
import com.jp.knowledge.fragment.VipZoneFragment;

/**
 * Created by 528787067@qq.com on 2017/6/14.
 */

public class VipZoneShowActivity extends SlidingActivity implements View.OnClickListener {

    private String id;
    private String packageId;
    private String title;

    private VipZoneFragment fragment;

    @Override
    protected int getResourceId() {
        return R.layout.fragment_team_circle_main;
    }

    @Override
    protected void init() {
        id = getIntent().getStringExtra("id");
        packageId = getIntent().getStringExtra("packageId");
        title = getIntent().getStringExtra("title");

        initTitleBar();
        fragment = VipZoneFragment.newInstance(id, packageId);
        getSupportFragmentManager()
                .beginTransaction()
                .replace(R.id.team_circle_content, fragment)
                .commit();
    }

    private void initTitleBar(){
        topName.setText(title);
        leftIcon.setImageResource(R.mipmap.arrow_white_left);
        leftIcon.setVisibility(View.VISIBLE);
        leftIcon.setOnClickListener(this);
        rightIcon.setVisibility(View.GONE);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.icon_left:
                finish();
                break;
        }
    }
}
